<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Parse Action Patterns</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script src="http://code.jquery.com/jquery-1.12.4.min.js"
	integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>

<script src="../docs-assets/Bigfoot.js"></script>
<link href="../docs-assets/Bigfoot.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Parse Action Patterns' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../inform7n.html">Inform7</a></li><li><a href="index.html">if</a></li><li><a href="index.html#4">Chapter 4: Actions</a></li><li><b>Parse Action Patterns</b></li></ul></div>
<p class="purpose">Turning text into APs.</p>

<ul class="toc"><li><a href="4-pap.html#SP1">&#167;1. Failure reasons</a></li><li><a href="4-pap.html#SP2">&#167;2. Global modes</a></li><li><a href="4-pap.html#SP5">&#167;5. Extracting only the action name list</a></li><li><a href="4-pap.html#SP6">&#167;6. Level One</a></li><li><a href="4-pap.html#SP8">&#167;8. Level Two</a></li><li><a href="4-pap.html#SP10">&#167;10. Level Three</a></li><li><a href="4-pap.html#SP12">&#167;12. Level Four</a></li><li><a href="4-pap.html#SP14">&#167;14. Lark's Tongues in Aspic, Part V</a></li><li><a href="4-pap.html#SP16">&#167;16. Level Six</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. Failure reasons.</b>Action patterns are complicated to parse and text can fail to match for many
different reasons, so that it can be hard to give a helpful problem message if
the author gets it wrong. (We can't simply fire off errors at the time they
occur, because text is often parsed in several contexts at once, so just
because it fails this one does not mean it is wrong.)  To improve our chances,
the code below sets the following global variable on each failure.
</p>

<pre class="definitions code-font"><span class="definition-keyword">enum</span> <span class="constant-syntax">MISC_PAPF</span><span class="plain-syntax"> </span><span class="identifier-syntax">from</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">NOPARTICIPLE_PAPF</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">MIXEDNOUNS_PAPF</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">WHEN_PAPF</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">WHENOKAY_PAPF</span>
<span class="definition-keyword">enum</span> <span class="constant-syntax">IMMISCIBLE_PAPF</span>
</pre>
<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">pap_failure_reason</span><span class="plain-syntax">; </span><span class="comment-syntax"> one of the above</span>
</pre>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. Global modes.</b>The parser is not contextless, and in particular can run in several globally
set modes:
</p>

<ul class="items"><li>&#9679; When we <span class="extract"><span class="extract-syntax">PERMIT_TRYING_OMISSION</span></span>, we allow "Ganatus going east" as well as the
more cumbersome "Ganatus trying going east".
</li><li>&#9679; When we <span class="extract"><span class="extract-syntax">FORBID_NONCONSTANT_ACTION_PARAMETERS</span></span>, we disallow the use of local
or global variables in action patterns.
</li><li>&#9679; When <span class="extract"><span class="extract-syntax">SCANNING_ANL_ONLY</span></span>, we do not perform a full parse, but only enough to
get as far as the action name list.
</li><li>&#9679; When we <span class="extract"><span class="extract-syntax">SUPPRESS_AP_PARSING</span></span>, the nonterminal &lt;action-pattern-core&gt; is
rigged always to fail.
</li></ul>
<pre class="definitions code-font"><span class="definition-keyword">define</span> <span class="constant-syntax">PERMIT_TRYING_OMISSION</span><span class="plain-syntax">                </span><span class="constant-syntax">1</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">FORBID_NONCONSTANT_ACTION_PARAMETERS</span><span class="plain-syntax">  </span><span class="constant-syntax">2</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">SCANNING_ANL_ONLY</span><span class="plain-syntax">                     </span><span class="constant-syntax">4</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">SUPPRESS_AP_PARSING</span><span class="plain-syntax">                   </span><span class="constant-syntax">8</span>
</pre>
<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">ParseActionPatterns::enter_mode</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">ParseActionPatterns::enter_mode</span></span>:<br/><a href="4-pap.html#SP5">&#167;5</a>, <a href="4-pap.html#SP6">&#167;6</a>, <a href="4-pap.html#SP9">&#167;9</a><br/>Action Patterns - <a href="4-ap2.html#SP6">&#167;6</a><br/>Parse Clauses - <a href="4-pc.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">pm</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">was</span><span class="plain-syntax"> = </span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax"> |= </span><span class="identifier-syntax">pm</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">was</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">ParseActionPatterns::exit_mode</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">ParseActionPatterns::exit_mode</span></span>:<br/><a href="4-pap.html#SP6">&#167;6</a>, <a href="4-pap.html#SP15">&#167;15</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">pm</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">was</span><span class="plain-syntax"> = </span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax"> &amp; </span><span class="identifier-syntax">pm</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax"> -= </span><span class="identifier-syntax">pm</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">was</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">ParseActionPatterns::restore_mode</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">ParseActionPatterns::restore_mode</span></span>:<br/><a href="4-pap.html#SP5">&#167;5</a>, <a href="4-pap.html#SP6">&#167;6</a>, <a href="4-pap.html#SP9">&#167;9</a>, <a href="4-pap.html#SP15">&#167;15</a><br/>Action Patterns - <a href="4-ap2.html#SP6">&#167;6</a><br/>Parse Clauses - <a href="4-pc.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax"> = </span><span class="identifier-syntax">saved</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;if-can-omit-trying&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span><span class="plain-syntax"> </span><span class="constant-syntax">0</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax"> &amp; </span><span class="constant-syntax">PERMIT_TRYING_OMISSION</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>

<span class="function-syntax">&lt;if-nonconstant-action-context&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span><span class="plain-syntax"> </span><span class="constant-syntax">0</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> (</span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax"> &amp; </span><span class="constant-syntax">FORBID_NONCONSTANT_ACTION_PARAMETERS</span><span class="plain-syntax">)?</span><span class="identifier-syntax">FALSE:TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="function-syntax">&lt;s-ap-parameter&gt;</span>
<span class="plain-syntax">    ^</span><span class="function-syntax">&lt;if-nonconstant-action-context&gt;</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;s-local-variable&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    ^</span><span class="function-syntax">&lt;if-nonconstant-action-context&gt;</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;s-global-variable&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;s-local-variable&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;s-global-variable&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;s-type-expression-or-value&gt;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>In addition, the AP parser runs in a current tense. At present, this is
always either <span class="extract"><span class="extract-syntax">IS_TENSE</span></span> or <span class="extract"><span class="extract-syntax">HASBEEN_TENSE</span></span>, but we'll keep our options open:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">prevailing_ap_tense</span><span class="plain-syntax"> = </span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">ParseActionPatterns::change_tense</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">ParseActionPatterns::change_tense</span></span>:<br/><a href="4-pap.html#SP10">&#167;10</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">tense</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved</span><span class="plain-syntax"> = </span><span class="identifier-syntax">prevailing_ap_tense</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">prevailing_ap_tense</span><span class="plain-syntax"> = </span><span class="identifier-syntax">tense</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">ParseActionPatterns::restore_tense</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">ParseActionPatterns::restore_tense</span></span>:<br/><a href="4-pap.html#SP10">&#167;10</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">prevailing_ap_tense</span><span class="plain-syntax"> = </span><span class="identifier-syntax">saved</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">ParseActionPatterns::current_tense</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">ParseActionPatterns::current_tense</span></span>:<br/><a href="4-pap.html#SP11">&#167;11</a>, <a href="4-pap.html#SP11_1">&#167;11.1</a><br/>Parse Clauses - <a href="4-pc.html#SP1">&#167;1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">prevailing_ap_tense</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. Extracting only the action name list.</b>This might seem redundant, since surely we could just parse the text to an AP
in the ordinary way and then take its action list. But going into <span class="extract"><span class="extract-syntax">SCANNING_ANL_ONLY</span></span>
mode enables us to ignore the text used as parameters; which means that we can
get the list even if we are parsing early in Inform's run, when such text may
still be incomprehensible.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">action_name_list</span><span class="plain-syntax"> *</span><span class="function-syntax">ParseActionPatterns::list_of_actions_only</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">ParseActionPatterns::list_of_actions_only</span></span>:<br/>Actions - <a href="4-act.html#SP5">&#167;5</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> *</span><span class="identifier-syntax">anyone</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    *</span><span class="identifier-syntax">anyone</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">action_name_list</span><span class="plain-syntax"> *</span><span class="identifier-syntax">anl</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved</span><span class="plain-syntax"> = </span><a href="4-pap.html#SP2" class="function-link"><span class="function-syntax">ParseActionPatterns::enter_mode</span></a><span class="plain-syntax">(</span><span class="constant-syntax">PERMIT_TRYING_OMISSION</span><span class="plain-syntax"> + </span><span class="constant-syntax">SCANNING_ANL_ONLY</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;action-pattern&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = (</span><span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *) </span><span class="function-syntax">&lt;&lt;rp&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">anl</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ap</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">action_list</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><a href="4-anl.html#SP10" class="function-link"><span class="function-syntax">ActionNameLists::nonempty</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">anl</span><span class="plain-syntax">)) &amp;&amp; (</span><span class="function-syntax">&lt;&lt;r&gt;&gt;</span><span class="plain-syntax"> == </span><span class="constant-syntax">ACTOR_EXP_UNIVERSAL</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            *</span><span class="identifier-syntax">anyone</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="4-pap.html#SP2" class="function-link"><span class="function-syntax">ParseActionPatterns::restore_mode</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">saved</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">anl</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. Level One.</b>This is where an action pattern is wrapped up as a test of a condition: see
<a href="4-ac.html" class="internal">Action Conditions</a> for more on this. The nonterminals here have no
return code, and have return value set to the <span class="extract"><span class="extract-syntax">parse_node</span></span> for the condition,
so that they can be used in the S-parser.
</p>

<p class="commentary">There are two forms of this: the first is for contexts where the AP might
occur as a noun ("Taking a jewel is felonious behaviour."). This makes sense
only in the present tense, and no "we are" or "we have" prefixes are allowed.
</p>

<p class="commentary">To see why this case is not like the others at Level One, imagine a story
where there is an action "setting", something called a "meter", and also a
value called the "meter setting".<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> Clearly the text "meter trying setting"
would be unambiguous, but if we allow "trying" to be omitted then there are
two possible readings of "meter setting" as a noun:
</p>

<ul class="items"><li>&#9679; the obvious one to a human reader, i.e., the value of the meter setting;
</li><li>&#9679; the action in which the meter is performing a setting.
</li></ul>
<p class="commentary">We reject the second option only by testing the actor to make sure it is a
person: for something inanimate like the meter, it is not.
</p>

<ul class="footnotetexts"><li class="footnote" id="fn:1"><p class="inwebfootnote"><sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> If that's too much of a stretch for the imagination, see the documentation
example "Witnessed 2", test case <span class="extract"><span class="extract-syntax">Witnessed</span></span>.
<a href="#fnref:1" title="return to text"> &#x21A9;</a></p></li></ul>
<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;s-action-pattern-as-value&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Wordings::mismatched_brackets</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) { ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> }; }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Lexer::word</span><span class="plain-syntax">(</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) == </span><span class="identifier-syntax">OPENBRACE_V</span><span class="plain-syntax">) { ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> }; }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved</span><span class="plain-syntax"> = </span><a href="4-pap.html#SP2" class="function-link"><span class="function-syntax">ParseActionPatterns::enter_mode</span></a><span class="plain-syntax">(0);</span>
<span class="plain-syntax">    </span><a href="4-pap.html#SP2" class="function-link"><span class="function-syntax">ParseActionPatterns::enter_mode</span></a><span class="plain-syntax">(</span><span class="constant-syntax">PERMIT_TRYING_OMISSION</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;action-pattern&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;rp&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">supposed_actor</span><span class="plain-syntax"> = </span><a href="4-apc.html#SP7" class="function-link"><span class="function-syntax">APClauses::spec</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ap</span><span class="plain-syntax">, </span><span class="constant-syntax">ACTOR_AP_CLAUSE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">supposed_actor</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">Dash::validate_parameter</span><span class="plain-syntax">(</span><span class="identifier-syntax">supposed_actor</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_person</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><a href="4-pap.html#SP2" class="function-link"><span class="function-syntax">ParseActionPatterns::exit_mode</span></a><span class="plain-syntax">(</span><span class="constant-syntax">PERMIT_TRYING_OMISSION</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;action-pattern&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) </span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;rp&gt;&gt;</span><span class="plain-syntax">; </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="4-pap.html#SP2" class="function-link"><span class="function-syntax">ParseActionPatterns::restore_mode</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">saved</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ap</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        ==&gt; { -, </span><a href="4-ac.html#SP1" class="function-link"><span class="function-syntax">AConditions::new_action_TEST_VALUE</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ap</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">) };</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. </b>The second form is for contexts where the AP occurs as a condition: e.g.,
in a sentence like "if we have taken a jewel". Since these can occur in
both tenses and can be negated ("if we are not taking a jewel"), there are
four combinations.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;s-action-pattern-as-condition&gt;</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;we-are-action-pattern&gt;</span>

<span class="function-syntax">&lt;s-action-pattern-as-negated-condition&gt;</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;action-pattern-negated&gt;</span>

<span class="function-syntax">&lt;s-past-action-pattern-as-condition&gt;</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;action-pattern-past&gt;</span>

<span class="function-syntax">&lt;s-past-action-pattern-as-negated-condition&gt;</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;action-pattern-past-negated&gt;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP8" class="paragraph-anchor"></a><b>&#167;8. Level Two.</b>The five s-nonterminals of Level One hand decisions down to five corresponding
nonterminals here. For each of these, the return code is one of the following
five values, and the return pointer is the <a href="4-ap2.html#SP3" class="internal">action_pattern</a> structure made.
Our aim here is to determine who will perform the action.
</p>

<pre class="definitions code-font"><span class="definition-keyword">define</span> <span class="constant-syntax">ACTOR_REQUESTED</span><span class="plain-syntax"> </span><span class="constant-syntax">0</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">ACTOR_NAMED</span><span class="plain-syntax"> </span><span class="constant-syntax">1</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">ACTOR_EXP_UNIVERSAL</span><span class="plain-syntax"> </span><span class="constant-syntax">2</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">ACTOR_EXP_PLAYER</span><span class="plain-syntax"> </span><span class="constant-syntax">3</span>
<span class="definition-keyword">define</span> <span class="constant-syntax">ACTOR_IMP_PLAYER</span><span class="plain-syntax"> </span><span class="constant-syntax">4</span>
</pre>
<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;action-pattern&gt;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">asking</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">to</span><span class="plain-syntax"> </span><span class="identifier-syntax">try</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">trying</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">an</span><span class="plain-syntax"> </span><span class="identifier-syntax">actor</span><span class="plain-syntax"> </span><span class="identifier-syntax">trying</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">an</span><span class="plain-syntax"> </span><span class="identifier-syntax">actor</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">trying</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;actor-description&gt;</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span>

<span class="function-syntax">&lt;we-are-action-pattern&gt;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">we</span><span class="plain-syntax"> </span><span class="identifier-syntax">are</span><span class="plain-syntax"> </span><span class="identifier-syntax">asking</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">to</span><span class="plain-syntax"> </span><span class="identifier-syntax">try</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">asking</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">to</span><span class="plain-syntax"> </span><span class="identifier-syntax">try</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">trying</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">an</span><span class="plain-syntax"> </span><span class="identifier-syntax">actor</span><span class="plain-syntax"> </span><span class="identifier-syntax">trying</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">an</span><span class="plain-syntax"> </span><span class="identifier-syntax">actor</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">we</span><span class="plain-syntax"> </span><span class="identifier-syntax">are</span><span class="plain-syntax"> </span><span class="identifier-syntax">trying</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">trying</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">we</span><span class="plain-syntax"> </span><span class="identifier-syntax">are</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;actor-description&gt;</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span>

<span class="function-syntax">&lt;action-pattern-negated&gt;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">we</span><span class="plain-syntax"> </span><span class="identifier-syntax">are</span><span class="plain-syntax"> </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="identifier-syntax">asking</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">to</span><span class="plain-syntax"> </span><span class="identifier-syntax">try</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="identifier-syntax">asking</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">to</span><span class="plain-syntax"> </span><span class="identifier-syntax">try</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="identifier-syntax">trying</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">an</span><span class="plain-syntax"> </span><span class="identifier-syntax">actor</span><span class="plain-syntax"> </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="identifier-syntax">trying</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">an</span><span class="plain-syntax"> </span><span class="identifier-syntax">actor</span><span class="plain-syntax"> </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">we</span><span class="plain-syntax"> </span><span class="identifier-syntax">are</span><span class="plain-syntax"> </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="identifier-syntax">trying</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="identifier-syntax">trying</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">we</span><span class="plain-syntax"> </span><span class="identifier-syntax">are</span><span class="plain-syntax"> </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;actor-description&gt;</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span>

<span class="function-syntax">&lt;action-pattern-past&gt;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">we</span><span class="plain-syntax"> </span><span class="identifier-syntax">have</span><span class="plain-syntax"> </span><span class="identifier-syntax">asked</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">to</span><span class="plain-syntax"> </span><span class="identifier-syntax">try</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">tried</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">an</span><span class="plain-syntax"> </span><span class="identifier-syntax">actor</span><span class="plain-syntax"> </span><span class="identifier-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">tried</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">an</span><span class="plain-syntax"> </span><span class="identifier-syntax">actor</span><span class="plain-syntax"> </span><span class="identifier-syntax">has</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-past&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">we</span><span class="plain-syntax"> </span><span class="identifier-syntax">have</span><span class="plain-syntax"> </span><span class="identifier-syntax">tried</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">we</span><span class="plain-syntax"> </span><span class="identifier-syntax">have</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-past&gt;</span>

<span class="function-syntax">&lt;action-pattern-past-negated&gt;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">we</span><span class="plain-syntax"> </span><span class="identifier-syntax">have</span><span class="plain-syntax"> </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="identifier-syntax">asked</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">to</span><span class="plain-syntax"> </span><span class="identifier-syntax">try</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="identifier-syntax">tried</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">an</span><span class="plain-syntax"> </span><span class="identifier-syntax">actor</span><span class="plain-syntax"> </span><span class="identifier-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="identifier-syntax">tried</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">an</span><span class="plain-syntax"> </span><span class="identifier-syntax">actor</span><span class="plain-syntax"> </span><span class="identifier-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-past&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">we</span><span class="plain-syntax"> </span><span class="identifier-syntax">have</span><span class="plain-syntax"> </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="identifier-syntax">tried</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">we</span><span class="plain-syntax"> </span><span class="identifier-syntax">have</span><span class="plain-syntax"> </span><span class="identifier-syntax">not</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-three-past&gt;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP8_1" class="paragraph-anchor"></a><b>&#167;8.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Someone requested</span><span class="named-paragraph-number">8.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><span class="identifier-syntax">RP</span><span class="plain-syntax">[2];</span>
<span class="plain-syntax">    </span><a href="4-apc.html#SP13" class="function-link"><span class="function-syntax">APClauses::set_request</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ap</span><span class="plain-syntax">); </span><a href="4-apc.html#SP7" class="function-link"><span class="function-syntax">APClauses::set_spec</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ap</span><span class="plain-syntax">, </span><span class="constant-syntax">ACTOR_AP_CLAUSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">RP</span><span class="plain-syntax">[1]);</span>
<span class="plain-syntax">    ==&gt; { </span><span class="constant-syntax">ACTOR_REQUESTED</span><span class="plain-syntax">, </span><span class="identifier-syntax">ap</span><span class="plain-syntax"> };</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="4-pap.html#SP8">&#167;8</a> (7 times).</li></ul>
<p class="commentary firstcommentary"><a id="SP8_2" class="paragraph-anchor"></a><b>&#167;8.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Someone specific</span><span class="named-paragraph-number">8.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><span class="identifier-syntax">RP</span><span class="plain-syntax">[2];</span>
<span class="plain-syntax">    </span><a href="4-apc.html#SP13" class="function-link"><span class="function-syntax">APClauses::clear_request</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ap</span><span class="plain-syntax">); </span><a href="4-apc.html#SP7" class="function-link"><span class="function-syntax">APClauses::set_spec</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ap</span><span class="plain-syntax">, </span><span class="constant-syntax">ACTOR_AP_CLAUSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">RP</span><span class="plain-syntax">[1]);</span>
<span class="plain-syntax">    ==&gt; { </span><span class="constant-syntax">ACTOR_NAMED</span><span class="plain-syntax">, </span><span class="identifier-syntax">ap</span><span class="plain-syntax"> };</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="4-pap.html#SP8">&#167;8</a> (8 times).</li></ul>
<p class="commentary firstcommentary"><a id="SP8_3" class="paragraph-anchor"></a><b>&#167;8.3. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Anyone except the player</span><span class="named-paragraph-number">8.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><span class="identifier-syntax">RP</span><span class="plain-syntax">[1]; </span><a href="4-apc.html#SP12" class="function-link"><span class="function-syntax">APClauses::make_actor_anyone_except_player</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ap</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    ==&gt; { </span><span class="constant-syntax">ACTOR_EXP_UNIVERSAL</span><span class="plain-syntax">, </span><span class="identifier-syntax">ap</span><span class="plain-syntax"> };</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="4-pap.html#SP8">&#167;8</a> (10 times).</li></ul>
<p class="commentary firstcommentary"><a id="SP9" class="paragraph-anchor"></a><b>&#167;9. </b>Note that the three present-tense cases all allow the abbreviated form
"Raffles taking a jewel" rather than the less likely to be ambiguous "Raffles
trying taking a jewel". This is allowed only in <span class="extract"><span class="extract-syntax">PERMIT_TRYING_OMISSION</span></span> mode,
and makes use of the following voracious nonterminal to match the actor's
name &mdash; here, just "Raffles".
</p>

<p class="commentary">The following tries to break just before any "-ing" word (i.e., participle)
which is not inside parentheses; but only if the resulting name matches
&lt;s-ap-parameter&gt; as a constant, variable, or description; and there is no
match if the text is the name of an instance but the "-ing" word could also be
read as part of that same name. For example, if we read the text
</p>

<blockquote>
    <p>angry waiting man taking the fish</p>
</blockquote>

<p class="commentary">where "angry waiting man" is the name of an individual person, then we don't
break this after "angry" (with the action "waiting") even though "angry"
would match as an abbreviated form of the name of "angry waiting man".
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;actor-description&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span><span class="plain-syntax"> ?</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax"> &amp; </span><span class="constant-syntax">PERMIT_TRYING_OMISSION</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">bl</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOOP_THROUGH_WORDING</span><span class="plain-syntax">(</span><span class="identifier-syntax">i</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax"> &gt; </span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Lexer::word</span><span class="plain-syntax">(</span><span class="identifier-syntax">i</span><span class="plain-syntax">) == </span><span class="identifier-syntax">OPENBRACKET_V</span><span class="plain-syntax">) </span><span class="identifier-syntax">bl</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Lexer::word</span><span class="plain-syntax">(</span><span class="identifier-syntax">i</span><span class="plain-syntax">) == </span><span class="identifier-syntax">CLOSEBRACKET_V</span><span class="plain-syntax">) </span><span class="identifier-syntax">bl</span><span class="plain-syntax">--;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">bl</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) &amp;&amp; (</span><span class="function-syntax">&lt;probable-participle&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">Wordings::one_word</span><span class="plain-syntax">(</span><span class="identifier-syntax">i</span><span class="plain-syntax">)))) {</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;k-kind&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">Wordings::up_to</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">-1))) </span><span class="reserved-syntax">continue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">try_stem</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">old_state</span><span class="plain-syntax"> = </span><a href="4-pap.html#SP2" class="function-link"><span class="function-syntax">ParseActionPatterns::enter_mode</span></a><span class="plain-syntax">(</span><span class="constant-syntax">SUPPRESS_AP_PARSING</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;s-ap-parameter&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">Wordings::up_to</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">-1))) </span><span class="identifier-syntax">try_stem</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;rp&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><a href="4-pap.html#SP2" class="function-link"><span class="function-syntax">ParseActionPatterns::restore_mode</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">old_state</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">k</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">LOOP_THROUGH_WORDING</span><span class="plain-syntax">(</span><span class="identifier-syntax">j</span><span class="plain-syntax">, </span><span class="identifier-syntax">Wordings::up_to</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">-1))</span>
<span class="plain-syntax">                        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Vocabulary::test_flags</span><span class="plain-syntax">(</span><span class="identifier-syntax">j</span><span class="plain-syntax">, </span><span class="identifier-syntax">ACTION_PARTICIPLE_MC</span><span class="plain-syntax">)) </span><span class="identifier-syntax">k</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">k</span><span class="plain-syntax">&gt;0) </span><span class="reserved-syntax">continue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">I</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Rvalues::to_object_instance</span><span class="plain-syntax">(</span><span class="identifier-syntax">try_stem</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">I</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                        </span><span class="identifier-syntax">noun</span><span class="plain-syntax"> *</span><span class="identifier-syntax">N</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Instances::get_noun</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Nouns::nominative_singular_includes</span><span class="plain-syntax">(</span><span class="identifier-syntax">N</span><span class="plain-syntax">, </span><span class="identifier-syntax">Lexer::word</span><span class="plain-syntax">(</span><span class="identifier-syntax">i</span><span class="plain-syntax">))) </span><span class="reserved-syntax">continue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    }</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">Lvalues::get_storage_form</span><span class="plain-syntax">(</span><span class="identifier-syntax">try_stem</span><span class="plain-syntax">) == </span><span class="identifier-syntax">LOCAL_VARIABLE_NT</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">                        (</span><span class="identifier-syntax">Lvalues::get_storage_form</span><span class="plain-syntax">(</span><span class="identifier-syntax">try_stem</span><span class="plain-syntax">) == </span><span class="identifier-syntax">NONLOCAL_VARIABLE_NT</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">                        (</span><span class="identifier-syntax">Node::is</span><span class="plain-syntax">(</span><span class="identifier-syntax">try_stem</span><span class="plain-syntax">, </span><span class="identifier-syntax">CONSTANT_NT</span><span class="plain-syntax">)) ||</span>
<span class="plain-syntax">                        (</span><span class="identifier-syntax">Specifications::is_description</span><span class="plain-syntax">(</span><span class="identifier-syntax">try_stem</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">                        ==&gt; { -, </span><span class="identifier-syntax">try_stem</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">                        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">-1;</span>
<span class="plain-syntax">                    }</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP10" class="paragraph-anchor"></a><b>&#167;10. Level Three.</b>We can forget about actors, and the above five cases reduce to only two, one
for each tense we support.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;ap-three-present&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax"> &amp; </span><span class="constant-syntax">SUPPRESS_AP_PARSING</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved</span><span class="plain-syntax"> = </span><a href="4-pap.html#SP4" class="function-link"><span class="function-syntax">ParseActionPatterns::change_tense</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><a href="4-pap.html#SP11" class="function-link"><span class="function-syntax">ParseActionPatterns::level_three</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="4-pap.html#SP4" class="function-link"><span class="function-syntax">ParseActionPatterns::restore_tense</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">saved</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ap</span><span class="plain-syntax">) { ==&gt; { -, </span><span class="identifier-syntax">ap</span><span class="plain-syntax"> }; </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>

<span class="function-syntax">&lt;ap-three-past&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax"> &amp; </span><span class="constant-syntax">SUPPRESS_AP_PARSING</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved</span><span class="plain-syntax"> = </span><a href="4-pap.html#SP4" class="function-link"><span class="function-syntax">ParseActionPatterns::change_tense</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">HASBEEN_TENSE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><a href="4-pap.html#SP11" class="function-link"><span class="function-syntax">ParseActionPatterns::level_three</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="4-pap.html#SP4" class="function-link"><span class="function-syntax">ParseActionPatterns::restore_tense</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">saved</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ap</span><span class="plain-syntax">) { ==&gt; { -, </span><span class="identifier-syntax">ap</span><span class="plain-syntax"> }; </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP11" class="paragraph-anchor"></a><b>&#167;11. </b>Other than merging the tenses into one code path, all we do at this level
is to look for any indication of duration. For example, "taking the box for the
third time" has "for the third time" trimmed away, and "taking the box" is
what passes down to Level Four.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="function-syntax">ParseActionPatterns::level_three</span><button class="popup" onclick="togglePopup('usagePopup8')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup8">Usage of <span class="code-font"><span class="function-syntax">ParseActionPatterns::level_three</span></span>:<br/><a href="4-pap.html#SP10">&#167;10</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">W</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="4-pap.html#SP11_1" class="named-paragraph-link"><span class="named-paragraph">There has to be a participle here somewhere</span><span class="named-paragraph-number">11.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">ACTION_PATTERN_PARSING</span><span class="plain-syntax">, </span><span class="string-syntax">"Parse action pattern (tense %d): %W\n"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">        </span><a href="4-pap.html#SP4" class="function-link"><span class="function-syntax">ParseActionPatterns::current_tense</span></a><span class="plain-syntax">(), </span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">time_period</span><span class="plain-syntax"> *</span><span class="identifier-syntax">duration</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Occurrence::parse</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">duration</span><span class="plain-syntax">) </span><span class="identifier-syntax">W</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Occurrence::unused_wording</span><span class="plain-syntax">(</span><span class="identifier-syntax">duration</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">pap_failure_reason</span><span class="plain-syntax"> = </span><span class="constant-syntax">MISC_PAPF</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><a href="4-pap.html#SP13" class="function-link"><span class="function-syntax">ParseActionPatterns::level_four</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ap</span><span class="plain-syntax">) </span><span class="identifier-syntax">ap</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">duration</span><span class="plain-syntax"> = </span><span class="identifier-syntax">duration</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">ACTION_PATTERN_PARSING</span><span class="plain-syntax">, </span><span class="string-syntax">"PAP result (pfr %d): $A\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pap_failure_reason</span><span class="plain-syntax">, </span><span class="identifier-syntax">ap</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">ap</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP11_1" class="paragraph-anchor"></a><b>&#167;11.1. </b>This saves a huge amount of time, since virtually any text gets through Levels
One and Two down to here. "Lady Eustace's Diamonds" cannot be an action pattern
since it contains no words which are part of an action (or named action pattern)
name; so we needn't spend any further time.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">There has to be a participle here somewhere</span><span class="named-paragraph-number">11.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Wordings::empty</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"PAP on illegal word range"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Lexer::word</span><span class="plain-syntax">(</span><span class="identifier-syntax">Wordings::first_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) == </span><span class="identifier-syntax">OPENBRACE_V</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">unsigned</span><span class="plain-syntax"> </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">d</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Vocabulary::disjunction_of_flags</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (((</span><a href="4-pap.html#SP4" class="function-link"><span class="function-syntax">ParseActionPatterns::current_tense</span></a><span class="plain-syntax">() == </span><span class="identifier-syntax">IS_TENSE</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">        ((</span><span class="identifier-syntax">d</span><span class="plain-syntax"> &amp; (</span><span class="identifier-syntax">ACTION_PARTICIPLE_MC</span><span class="plain-syntax">+</span><span class="identifier-syntax">NAMED_AP_MC</span><span class="plain-syntax">)) == </span><span class="constant-syntax">0</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">pap_failure_reason</span><span class="plain-syntax"> = </span><span class="constant-syntax">NOPARTICIPLE_PAPF</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="4-pap.html#SP11">&#167;11</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP12" class="paragraph-anchor"></a><b>&#167;12. Level Four.</b>This level deals only with the pronominal action "doing it", an anaphora which
refers by implication to whatever action pattern was previously discussed before
this one. Parsing this accurately is a fool's errand, and allowing this syntax
in Inform was not a good idea, because the potential for confusion is too great.
That said, it does enable, for example, the cool rule:
</p>

<blockquote>
    <p>Instead of Raffles taking the box for the second time, try Bunny doing it.</p>
</blockquote>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;ap-four-pronominal&gt;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">doing</span><span class="plain-syntax"> </span><span class="identifier-syntax">it</span>
</pre>
<p class="commentary firstcommentary"><a id="SP13" class="paragraph-anchor"></a><b>&#167;13. </b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">pronominal_action_wording</span><span class="plain-syntax"> = </span><span class="identifier-syntax">EMPTY_WORDING_INIT</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="function-syntax">ParseActionPatterns::level_four</span><button class="popup" onclick="togglePopup('usagePopup9')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup9">Usage of <span class="code-font"><span class="function-syntax">ParseActionPatterns::level_four</span></span>:<br/><a href="4-pap.html#SP11">&#167;11</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">W</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;ap-four-pronominal&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Wordings::nonempty</span><span class="plain-syntax">(</span><span class="identifier-syntax">pronominal_action_wording</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">ACTION_PATTERN_PARSING</span><span class="plain-syntax">, </span><span class="string-syntax">"Pronominal is %W\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;ap-five&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">pronominal_action_wording</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;&lt;rp&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;ap-five&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">pronominal_action_wording</span><span class="plain-syntax"> = </span><span class="identifier-syntax">W</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">ACTION_PATTERN_PARSING</span><span class="plain-syntax">, </span><span class="string-syntax">"Set pronominal to: %W\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;&lt;rp&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP14" class="paragraph-anchor"></a><b>&#167;14. Lark's Tongues in Aspic, Part V.</b>Down here at Level Five, everything has funnelled into a single nonterminal.
Its task is to recognise a condition attached with "when", which goes into a
special clause of its own.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;ap-five&gt;</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;ap-six&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">when</span><span class="plain-syntax">/</span><span class="reserved-syntax">while</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-five-condition&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    </span><span class="function-syntax">&lt;ap-six&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    ... </span><span class="identifier-syntax">when</span><span class="plain-syntax">/</span><span class="reserved-syntax">while</span><span class="plain-syntax"> </span><span class="function-syntax">&lt;ap-five-condition&gt;</span><span class="plain-syntax"> |</span>
<span class="plain-syntax">    ... </span><span class="identifier-syntax">when</span><span class="plain-syntax">/</span><span class="reserved-syntax">while</span><span class="plain-syntax"> ...</span>
</pre>
<p class="commentary firstcommentary"><a id="SP14_1" class="paragraph-anchor"></a><b>&#167;14.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Succeed with when okay</span><span class="named-paragraph-number">14.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><span class="identifier-syntax">RP</span><span class="plain-syntax">[1]; </span><a href="4-apc.html#SP7" class="function-link"><span class="function-syntax">APClauses::set_spec</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ap</span><span class="plain-syntax">, </span><span class="constant-syntax">WHEN_AP_CLAUSE</span><span class="plain-syntax">, </span><span class="identifier-syntax">RP</span><span class="plain-syntax">[2]);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">pap_failure_reason</span><span class="plain-syntax"> == </span><span class="constant-syntax">MISC_PAPF</span><span class="plain-syntax">) </span><span class="identifier-syntax">pap_failure_reason</span><span class="plain-syntax"> = </span><span class="constant-syntax">WHENOKAY_PAPF</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    ==&gt; { -, </span><span class="identifier-syntax">ap</span><span class="plain-syntax"> };</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="4-pap.html#SP14">&#167;14</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP14_2" class="paragraph-anchor"></a><b>&#167;14.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Fail with when okay</span><span class="named-paragraph-number">14.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">pap_failure_reason</span><span class="plain-syntax"> = </span><span class="constant-syntax">WHENOKAY_PAPF</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="4-pap.html#SP14">&#167;14</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP14_3" class="paragraph-anchor"></a><b>&#167;14.3. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Fail with when not okay</span><span class="named-paragraph-number">14.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">pap_failure_reason</span><span class="plain-syntax"> != </span><span class="constant-syntax">WHENOKAY_PAPF</span><span class="plain-syntax">) </span><span class="identifier-syntax">pap_failure_reason</span><span class="plain-syntax"> = </span><span class="constant-syntax">WHEN_PAPF</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="4-pap.html#SP14">&#167;14</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP15" class="paragraph-anchor"></a><b>&#167;15. </b>&lt;ap-five-condition&gt; is really just &lt;s-condition&gt; in disguise &mdash; i.e.,
it matches a standard Inform condition &mdash; but it's implemented as an internal
to enable Inform to set up a stack frame if there isn't one already, and so on.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;ap-five-condition&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">stack_frame</span><span class="plain-syntax"> *</span><span class="identifier-syntax">phsf</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Frames::current_stack_frame</span><span class="plain-syntax">() == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">phsf</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Frames::new_nonphrasal</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">SharedVariables::append_access_list</span><span class="plain-syntax">(</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Frames::get_shared_variable_access_list</span><span class="plain-syntax">(), </span><span class="identifier-syntax">all_nonempty_stacked_action_vars</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">ACTION_PATTERN_PARSING</span><span class="plain-syntax">, </span><span class="string-syntax">"A when clause &lt;%W&gt; is suspected.\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">when_cond</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">s</span><span class="plain-syntax"> = </span><span class="identifier-syntax">pap_failure_reason</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved</span><span class="plain-syntax"> = </span><a href="4-pap.html#SP2" class="function-link"><span class="function-syntax">ParseActionPatterns::exit_mode</span></a><span class="plain-syntax">(</span><span class="constant-syntax">PERMIT_TRYING_OMISSION</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="function-syntax">&lt;s-condition&gt;</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) </span><span class="identifier-syntax">when_cond</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;&lt;rp&gt;&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">pap_failure_reason</span><span class="plain-syntax"> = </span><span class="identifier-syntax">s</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="4-pap.html#SP2" class="function-link"><span class="function-syntax">ParseActionPatterns::restore_mode</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">saved</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">phsf</span><span class="plain-syntax">) </span><span class="identifier-syntax">Frames::remove_nonphrase_stack_frame</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">when_cond</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">Dash::validate_conditional_clause</span><span class="plain-syntax">(</span><span class="identifier-syntax">when_cond</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">ACTION_PATTERN_PARSING</span><span class="plain-syntax">, </span><span class="string-syntax">"When clause validated: $P.\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">when_cond</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        ==&gt; { -, </span><span class="identifier-syntax">when_cond</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP16" class="paragraph-anchor"></a><b>&#167;16. Level Six.</b>Much of the complexity is gone now, but much potential ambiguity remains, and
so what's left can't very efficiently be written in Preform.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="function-syntax">&lt;ap-six&gt;</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Wordings::mismatched_brackets</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">)) { ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> }; }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">parse_action_pattern_mode</span><span class="plain-syntax"> &amp; </span><span class="constant-syntax">SCANNING_ANL_ONLY</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">action_name_list</span><span class="plain-syntax"> *</span><span class="identifier-syntax">list</span><span class="plain-syntax"> = </span><a href="4-anl.html#SP29" class="function-link"><span class="function-syntax">ActionNameLists::parse</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">prevailing_ap_tense</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">list</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) { ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> }; }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><a href="4-ap2.html#SP4" class="function-link"><span class="function-syntax">ActionPatterns::new</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">ap</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">action_list</span><span class="plain-syntax"> = </span><span class="identifier-syntax">list</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        ==&gt; { -, </span><span class="identifier-syntax">ap</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">ACTION_PATTERN_PARSING</span><span class="plain-syntax">, </span><span class="string-syntax">"Parsing action pattern: %W\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOG_INDENT</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">action_pattern</span><span class="plain-syntax"> *</span><span class="identifier-syntax">ap</span><span class="plain-syntax"> = </span><a href="4-pc.html#SP1" class="function-link"><span class="function-syntax">ParseClauses::ap_seven</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">ACTION_PATTERN_PARSING</span><span class="plain-syntax">, </span><span class="string-syntax">"Level Seven on %W gives $A\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">ap</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOG_OUTDENT</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ap</span><span class="plain-syntax">) { ==&gt; { -, </span><span class="identifier-syntax">ap</span><span class="plain-syntax"> }; </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    ==&gt; { </span><span class="identifier-syntax">fail</span><span class="plain-syntax"> </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> };</span>
<span class="plain-syntax">}</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="4-apc.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-im.html">1</a></li><li class="progresschapter"><a href="2-bd.html">2</a></li><li class="progresschapter"><a href="3-sm.html">3</a></li><li class="progresscurrentchapter">4</li><li class="progresssection"><a href="4-ap.html">ap</a></li><li class="progresssection"><a href="4-anaa.html">anaa</a></li><li class="progresssection"><a href="4-ak.html">ak</a></li><li class="progresssection"><a href="4-ac.html">ac</a></li><li class="progresssection"><a href="4-act.html">act</a></li><li class="progresssection"><a href="4-as.html">as</a></li><li class="progresssection"><a href="4-av.html">av</a></li><li class="progresssection"><a href="4-ann.html">ann</a></li><li class="progresssection"><a href="4-ap2.html">ap2</a></li><li class="progresssection"><a href="4-anl.html">anl</a></li><li class="progresssection"><a href="4-apc.html">apc</a></li><li class="progresscurrent">pap</li><li class="progresssection"><a href="4-pc.html">pc</a></li><li class="progresssection"><a href="4-ea.html">ea</a></li><li class="progresssection"><a href="4-nap.html">nap</a></li><li class="progresssection"><a href="4-gng.html">gng</a></li><li class="progresssection"><a href="4-rpoa.html">rpoa</a></li><li class="progresschapter"><a href="5-pp.html">5</a></li><li class="progresschapter"><a href="6-dlg.html">6</a></li><li class="progressnext"><a href="4-pc.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

